- if translations_changes.empty?
  .alert.alert-info
    = t('.no_matches')
- else
  %table.table.table-striped.table-bordered
    %thead
      %tr
        %th
          = t('.key')
        %th
          = t('.locale')
        %th
          = t('.user')
        %th
          = t('.changes')
        %th
          = t('.time')

    %tbody
      - translations_changes.each do |change|
        %tr
          %td
            = link_to change.auditable.key.name, change.auditable.key, target: '_blank'
          %td
            = change.auditable.lang
          %td
            = change.auditable.translator.try TranslationCenter::CONFIG['identifier_type']
          %td
            %ul
              - change.audited_changes.each do |change, value|
                %li
                  = format_change(change, value)
          %td
            = distance_of_time_in_words_to_now change.created_at
            = t('.ago')
  .pagination
    - query_without_page_param = request.query_string.gsub(/&?page=\d*/, '')
    = link_to t('pagination.first'), "#{request.protocol}#{request.host_with_port}#{request.path}?#{query_without_page_param}&page=1"
    - if @page != 1
      |
      = link_to t('pagination.prev'), "#{request.protocol}#{request.host_with_port}#{request.path}?#{query_without_page_param}&page=#{@page - 1}"
    |
    = link_to t('pagination.next'), "#{request.protocol}#{request.host_with_port}#{request.path}?#{query_without_page_param}&page=#{@page + 1}"
    - if @page != @total_pages
      |
      = link_to t('pagination.last'), "#{request.protocol}#{request.host_with_port}#{request.path}?#{query_without_page_param}&page=#{@total_pages}"
    = @page
    = t('.of')
    = @total_pages
